/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.elookinto.blackhat;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import org.openqa.selenium.WebElement;

/**
 *
 * @author zw251y
 */
public class InsertLinksFromText {

    public static void main(String s[]) throws Exception {

        FileWriter fw = new FileWriter("C:/Users/zw251y/Documents/NetBeansProjects/blackhat/src/test/java/com/elookinto/blackhat/g-game.html", true);
        FileReader fr = new FileReader("C:/Users/zw251y/Documents/NetBeansProjects/blackhat/src/test/java/com/elookinto/blackhat/g-game.txt");
        String line = null;
        BufferedReader br = new BufferedReader(fr);
        while ((line = br.readLine()) != null) {


            fw.append("<a href='/search?q=" + java.net.URLEncoder.encode(line) + "'>" + line + "</a> <br/>\n");

        }
        fw.close();
        fr.close();

    }
}
